QAColorTableNew
You can use theQAColorTableNew
function to create a new color lookup table.
TQAError QAColorTableNew ( const TQAEngine *engine, TQAColorTableType tableType, void *pixelData, long transparentIndexFlag, TQAColorTable **newTable);
engine
- A drawing engine.
tableType
- The type of the new color lookup table. See "Color Lookup Table Types" (page 1-37) for information on the available color lookup table types.
pixelData
- A pointer to the color lookup table entries.
transparentIndexFlag
- A long integer, interpreted as a Boolean value, that indicates whether the color lookup table entry at index 0 is completely transparent (
TRUE
) or not (FALSE
).newTable
- On entry, the address of a pointer variable. On exit, that variable points to a new color lookup table. If a new color lookup table cannot be created,
*newTable
is set to the valueNULL
.DESCRIPTION
TheQAColorTableNew
function returns, through thenewTable
parameter, a new color lookup table associated with the drawing engine specified by theengine
parameter. The table entries for the new color lookup table are copied from the block of data pointed to by thepixelData
parameter; ifQAColorTableNew
completes successfully, you can dispose of that block of memory. The data in that block of memory is interpreted according to the format specified by thetableType
parameter. For example, iftableType
iskQAColorTable_CL8_RGB32
, thenpixelData
should point to a block of data that is at least 1024 bytes long and in which each 32-bit quantity is an RGB color value.
Not all drawing engines support color lookup tables, and QuickDraw 3D RAVE does not provide color lookup table emulation for engines that do not support them.
- IMPORTANT
- Currently, QuickDraw 3D RAVE supports only 32-bit RGB color lookup table entries. The specified drawing engine might reduce the size of individual color lookup table entries to fit into its on-board memory.
![]()
SEE ALSO
Use theQAColorTableDelete
function (next) to delete a color lookup table. Use theQATextureBindColorTable
function (page 1-87) to bind a color lookup table to a texture map. Use theQABitmapBindColorTable
function (page 1-90) to bind a color lookup table to a bitmap.